/**
 * author: XGP
 * date: 2018/07/25
 * des: 人员招聘-招聘规划
 */
import request from '@/utils/request'

/**
 * 查询招聘信息状态统计
 */
export function findStatusCount() {
  return request({
    url: '/recruitreqs/findStatusCount',
    method: 'get'
  })
}

/**
 * 按状态查询详细人员信息
 */
export function getRequireList(params) {
  return request({
    url: '/recruitreqs/findByStatus',
    method: 'get',
    params: params
  })
}

/**
 * 详情
 */
export function getReqdetail(id) {
  return request({
    url: '/recruitreqs/find/' + id,
    method: 'get'

  })
}

/**
 * 新增需求
 */
export function addRequire(data) {
  return request({
    url: '/recruitreqs/insert',
    method: 'post',
    data
  })
}
/**
 * 高级搜索
 */
export function searchRequire(data) {
  // console.log(data);
  return request({
    url: '/hr/recruit/require/searchReq/mock',
    method: 'get',
    data
  })
}
/**
 * 编辑需求
 */
export function editRequire(data) {
  return request({
    url: '/recruitreqs/update',
    method: 'put',
    data
  })
}

/**
 * 停止招聘
 */
export function stopRequire(data) {
  return request({
    url: 'recruitreqs/stopRecruits',
    method: 'put',
    data
  })
}

/**
 * 删除需求
 */
export function deleteReq(reqId) {
  return request({
    url: '/recruitreqs/delete/' + reqId,
    method: 'delete'

  })
}


/**
 * 放弃申请
 */
export function giveupReq(data) {
  return request({
    url: '/recruitreqs/giveup',
    method: 'post',
    params: data
  })
}


/**
 * 重新提交
 */
export function updateBackSubmit(data) {
  return request({
    url: '/recruitreqs/updateBack',
    method: 'put',
    data: data
  })
}





/**
 * 根据规划查询部门
 */
export function getOrgdetail(planId) {
  return request({
    url: '/hr/recruitment/recruitplan/find/' + planId,
    method: 'get'
  })
}

/**
 * 根据部门查询岗位
 * @param {*} params
 */
export function getPositionApi(params) {
  return request({
    url: '/hr/recruitment/recruitplan/findPositionByOrg',
    method: 'get',
    params: params
  })
}





/**
 * 根据部门，岗位获取最低薪资，最高薪资
 * @param {*} params
 */
export function findSalaryTwo(params) {
  return request({
    url: '/hr/salary/salaryfixs/findSalaryTwo',
    method: 'get',
    params: params
  })
}

